package UVA;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Scanner;

/*
 * @Author Josh Lear
 * @Day 4/19/2014
 * @Problem simple IO/mechanics
 */
public class UVA_12577 {
    public static void main (String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(
                System.out));
        int i = 1;
        while (true) {
            String cur = sc.nextLine();
            if (cur.equals("*")) {
                bw.flush();
                sc.close();
                return;
            }
            bw.write("Case " + i + ": Hajj-e-");
            i++;
            if (cur.endsWith("h")) {
                bw.write("Asghar\n");
            } else {
                bw.write("Akbar\n");
            }
        }
    }
}
